#include <iostream>
#include <map>

using namespace std;

typedef pair<int, int> PII;
map<PII, int> mp;
int n, R, C;

int main()
{
	cin >> n >> R >> C;
	string s; cin >> s;
	s = " " + s;
	mp[{0, 0}]++;
	int r = 0, c = 0;
	for(int i = 1; i <= n; i++)
	{
		if(s[i] == 'N')
		{
			R++;
			r++;
		}
		else if(s[i] == 'E')
		{
			C--;
			c--;
		}
		else if(s[i] == 'W')
		{
			C++;
			c++;
		}
		else
		{
			R--;
			r--;
		}
		mp[{r, c}]++;
		if(mp[{R, C}] != 0) cout << 1;
		else cout << 0;
	}
	return 0;
}
